<template>
    <div>
 <van-skeleton :row="7" :loading="!ispd"/>  
 <div v-if="ispd">    
<van-nav-bar title="首页" />
<ss></ss>
<lbt :images="img"></lbt>
<van-grid :column-num="4">
  <van-grid-item v-for="value in catitemsdata" :key="value" :icon="value.image_src" :text="value.name" />
</van-grid>
<div  v-for="key in floordata" :key="key">
<img :src="key.floor_title.image_src" alt="" width="100%">
<div v-for="key in key.product_list" :key="key" style="float:left; margin: 2px;">
<img :src="key.image_src" alt="" width="120px" height="120px">
</div>
</div>
</div> 
    </div>
</template>

<script setup>
import { ref } from "vue";
import lbt from '@/components/lbt.vue'
import ss from '@/components/ss.vue'
import { swiperdataApi,catitemsApi,floordataApi } from "@/api/api";
let img=ref([])
let catitemsdata=ref([])
let floordata=ref([])
swiperdataApi().then(res=>{
    console.log('lbt',res);
    img.value=res.data.message
})
catitemsApi().then(res=>{
    console.log('dh',res);
    catitemsdata.value=res.data.message
})
floordataApi().then(res=>{
    console.log('lc',res);
    floordata.value=res.data.message
})
let ispd=ref(false)
    setTimeout(()=>{
        ispd.value=true
    },1500)
</script>

<style lang="scss" scoped>

</style>